const fs = require("fs");
const { json } = require("stream/consumers");
const path = require("path");
console.log(__dirname);


const info=JSON.parse(fs.readFileSync(path.join(__dirname,'./data/info.json'),'utf8'))

let random = Math.floor(Math.random()*(info.length));

info[random-1].count++
console.log(info);
const infoJson=JSON.stringify(info)
fs.writeFileSync(path.join(__dirname,'./data/info.json'),infoJson)
